#Intro to Flask
Supporting slides can be found here
- Install Python
- Install virtualenv
- Install virtualenvwrapper or virtualenvwrapper-win
- Create a virtual environment
- Install flask
- Run our flask project
- Checkout the next bit of code
$ pip install virtualenv
virtualenv wrappers make it easy to manage multiple environments and can make iterating on project easy.
C:\ pip install virtualenvwrapper-win
$ pip install virtualenvwrapper
$ export WORKON_HOME=~/Envs
$ source /usr/local/bin/virtualenvwrapper.sh
$ mkvirtualenv venv
deavtivate environment
$ deavtivate
workon that environment
$workon venv
EXTRA: link directory to virtualenv
$ setprojectdir .
$ deactivate
$ workon helloworld
Before moving forward - Make sure you're virtualenv is activated. Should look like this:
(venv) path\to\something\like\your\project$
Now we need flask for our first website!
$ pip install flask
$ git clone https://github.com/timmyreilly/introduction-to-flask.git
$ git checkout a
$ python hello.py
* Running on http://localhost:5000/